package cn.com.pc.content.domain.audit;

/**
 * 内容类型
 */
public enum AuditStatus {
    Pending("pending", "待审"),
    Publish("publish", "通过"),
    Reject("reject", "不通过"),
    Deleted("deleted", "删除");

    private final String name;
    private final String fullname;

    AuditStatus(String name, String fullname) {
        this.name = name;
        this.fullname = fullname;
    }

//    @JsonCreator
    public static AuditStatus getSourceByName(String name){
        for(AuditStatus AuditStatus : values()){
            if(AuditStatus.getName().equals(name)){
                return AuditStatus;
            }
        }
        return null;
    }

//    @JsonValue
    public String getName() {
        return name;
    }

    public String getFullname() {
        return this.fullname;
    }

}
